package com.itheima.pojo;

import java.math.BigDecimal;
import java.util.Date;

public class Order {
    private Integer orderId;
    private Integer customerId; // 外键
    private Date orderDate;
    private BigDecimal totalAmount;
    private String status;
    // private Customer customer; // 可选的反向关联

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    public Date getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(Date orderDate) {
        this.orderDate = orderDate;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Order{" +
                "orderId=" + orderId +
                ", customerId=" + customerId +
                ", orderDate=" + orderDate +
                ", totalAmount=" + (totalAmount != null ? totalAmount.toPlainString() : "null") + // .toPlainString() is often preferred for BigDecimal
                ", status='" + status + '\'' +
                '}';
    }
// Getters and Setters...
}